CC = gcc
CFLAGS = -Wall -Werror -pthread -O3
LDFLAGS = -lcurses

LIBS = lightswitch.o
PROGRAMS = baboon.a

all: $(PROGRAMS)

%.a: %.o $(LIBS)
	$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS)

%.o: %.c
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

clean:
	rm -f *.o *~ *.aux *.log *.dvi $(PROGRAMS)

.PHONY: all
.PHONY: clean
